package com.liqi.display;

import com.liqi.display.schedule.ScheduledTasks;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan(basePackages = "com.liqi.display.mapper")
@EnableScheduling
public class LiqiDisplayApiApplication {

	static {
	    System.setProperty("druid.mysql.usePingMethod","false");
	}
	
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(LiqiDisplayApiApplication.class, args);
        // 启动的 执行定时任务的方法（9.每月各渠道业务受理量）
        ScheduledTasks scheduledTasks = run.getBean(ScheduledTasks.class);
        scheduledTasks.acceptMethodInit();
    }
}
